import axios from 'axios'
import {getCookie} from '../../util/index'

const instance=axios.create();

instance.wapUrl="http://api.51clj.com"
instance.defaults.timeout=5000
instance.defaults.headers['Content-Type']='application/x-www-form-urlencoded'
axios.interceptors.request.use=instance.interceptors.request.use
instance.interceptors.request.use(config=>{
    return config
},err=>{
    return Promise.reject(err)
})

instance.interceptors.response.use(response=>{
    return response
},err=>{
    return Promise.reject(err)
})

export default instance